package pa4.interfaces;

import java.rmi.Remote;
import java.rmi.RemoteException;

public interface Node<V> extends Remote{
	
	public Node<V> getLeftChild() throws RemoteException;
	public Node<V> getRightChild() throws RemoteException;
	
	public void setLeftChild(Node<V> child) throws RemoteException;
	public void setRightChild(Node<V> child) throws RemoteException;
	
	public void repair() throws RemoteException;
	
	//DHT-methods
	public V get(int key) throws RemoteException; 
	public void put(int key, V value) throws RemoteException;
	public void remove(int key) throws RemoteException;
	public boolean isLeaf() throws RemoteException;
	public Peer<V> getPeer() throws RemoteException;
	public String getLeftChildAddress() throws RemoteException;
	public String getRightChildAddress() throws RemoteException;
	public int getLeftChildId() throws RemoteException;
	public int getRightChildId() throws RemoteException;
	public int getId() throws RemoteException;
	public int getLevel() throws RemoteException;
}
